<!DOCTYPE html>
<html>
  <head>
    <title><%= content_for?(:title) ? yield(:title) : site_name_with_description %></title>
    <meta name="description" content="<%= content_for?(:description) ? yield(:description) : site_name_with_description %>">
    <%= stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true %>
    <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
    <%= javascript_include_tag "https://www.google.com/jsapi" %>
    <%= csrf_meta_tags %>
    <%= yield(:head) %>
  </head>
  <body id="home">
    <header id="header-container" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div id="nav-container" class="container">
        <%= link_to site_name_no_space+"(beta)", root_path, :class => 'navbar-brand' %>
        <div>
          <ul class="nav navbar-nav ">
            <li><%= link_to root_path do %><i class="glyphicon glyphicon-home"></i> Home<% end %></li>
            <li><%= link_to info_page_path do %><i class="glyphicon glyphicon-info-sign"></i> Info<% end %></li>
            <li><%= link_to rules_path, {:style=>'color:red;'} do %><i class="glyphicon glyphicon-ban-circle"></i> Rules<% end %></li>
            <%= render 'layouts/browse' %>
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <% if user_signed_in? %>
              <%= render 'layouts/ulinks' %>
            <% else %>
              <div style="margin-top:8px;">
                <%= link_to user_omniauth_authorize_path(:facebook), :class=>"btn btn-social btn-facebook" do %>
                  <i class="fa fa-facebook"></i> Sign in with Facebook
                <% end %>
              </div>
            <% end %>
          </ul>
        </div>
      </div>
    </header>

    <div id="front-container" class="front-container" role="main">
      <div class="front-card">
        <div class="front-welcome lead">
          <h2>Welcome to Fightere.</h2>
          <p style="color:#ccc;">
          Fightere is a ladder network for fighters who practise martial arts and seek more challenges.
          No style limits, no weight divisions, the only way to advance on the ladder is to win the fight.
          </p>
          <p><em>"If you haven't lost, you haven't fought the right guys yet."</em></p>
          <p style="color:#ccc;">You think you can fight? Join now!</p>
        </div>

        <div class="front-signin">
          <%= form_for("user", :url => user_session_path) do |f| %>
            <fieldset>
              <%= f.email_field :email, :placeholder=>"Email", :class=>"form-control" %>
              <%= f.password_field :password, :placeholder=>"Password", :class=>"form-control" %>
              <div class="checkbox">
                <%= f.check_box :remember_me %>
                <%= f.label :remember_me %>
              </div>
              <%= f.submit "Login", :class => "btn btn-primary pull-right" %>
              <%= link_to "Forgot password?", new_password_path('user'), :class=>"pull-left" %>
            </fieldset>
          <% end %>
        </div>
        
        <div class="front-signup">
          <%= form_for("user", :url => user_registration_path) do |f| %>
            <fieldset>
              <%= f.email_field :email, :placeholder=>"Email", :class=>"form-control" %>
              <%= f.password_field :password, :placeholder=>"Password", :class=>"form-control" %>
              <%= f.password_field :password_confirmation, :placeholder=>"Confirm Password", :class=>"form-control" %>
              <br>
              <%= f.submit "Sign up", :class => "btn btn-success pull-right" %>
            </fieldset>
          <% end %>
        </div>

        <div class="front-footer">
          <p>&copy; 2014 Fightere</p>
        </div> 
      </div>
    </div>
  </body>
</html>

